#include<stdio.h>
struct Tree
{
    int people;
    int left;
    int right
}T[1000];

int main()
{
    freopen("in.txt","r",stdin);
    int n;
    scanf("%d",&n);
    for(int i = 0; i < n; i++)  scanf("%d %d %d",&T[i].people,&T[i].left,&T[i].right);
    for(int i = 0; i < n; i++)
    {
        
    }
}